\hypertarget{classduye_1_1_cfg_mgr}{\section{duye\-:\-:Cfg\-Mgr Class Reference}
\label{classduye_1_1_cfg_mgr}\index{duye\-::\-Cfg\-Mgr@{duye\-::\-Cfg\-Mgr}}
}


configuration manager class  




{\ttfamily \#include $<$duye\-\_\-cfg\-\_\-mgr.\-h$>$}

\subsection*{Classes}
\begin{DoxyCompactItemize}
\item 
class \hyperlink{classduye_1_1_cfg_mgr_1_1_param_node}{Param\-Node}
\end{DoxyCompactItemize}
\subsection*{Public Types}
\begin{DoxyCompactItemize}
\item 
\hypertarget{classduye_1_1_cfg_mgr_a62246fb22190f36d6ccf415d3afb0daf}{typedef std\-::list$<$ \hyperlink{classduye_1_1_cfg_mgr_1_1_param_node}{Param\-Node} $>$ {\bfseries Param\-Node\-List}}\label{classduye_1_1_cfg_mgr_a62246fb22190f36d6ccf415d3afb0daf}

\end{DoxyCompactItemize}
\subsection*{Public Member Functions}
\begin{DoxyCompactItemize}
\item 
bool \hyperlink{classduye_1_1_cfg_mgr_a5c40c59a30b47b14c230ac8fc23e8c68}{load} (const std\-::string \&file\-Path)
\item 
bool \hyperlink{classduye_1_1_cfg_mgr_a44189e43c4b5da93417d1d1158d6fc62}{set\-Value} (const std\-::string \&path, const bool value, const std\-::string \&att\-Name)
\begin{DoxyCompactList}\small\item\em get configuration value \end{DoxyCompactList}\item 
\hypertarget{classduye_1_1_cfg_mgr_aa59763d750ba43df1c9e5af069a707da}{bool {\bfseries set\-Value} (const std\-::string \&path, const bool value)}\label{classduye_1_1_cfg_mgr_aa59763d750ba43df1c9e5af069a707da}

\item 
\hypertarget{classduye_1_1_cfg_mgr_ab954a0b20ab8a8233cbb2f2c2ecea535}{bool {\bfseries set\-Value} (const std\-::string \&path, const int32 value, const std\-::string \&att\-Name)}\label{classduye_1_1_cfg_mgr_ab954a0b20ab8a8233cbb2f2c2ecea535}

\item 
\hypertarget{classduye_1_1_cfg_mgr_a58919a0bbbf8510d1ee7661cc412c828}{bool {\bfseries set\-Value} (const std\-::string \&path, const int32 value)}\label{classduye_1_1_cfg_mgr_a58919a0bbbf8510d1ee7661cc412c828}

\item 
\hypertarget{classduye_1_1_cfg_mgr_ade5c77940558008839e20ecb65934689}{bool {\bfseries set\-Value} (const std\-::string \&path, const int64 value, const std\-::string \&att\-Name)}\label{classduye_1_1_cfg_mgr_ade5c77940558008839e20ecb65934689}

\item 
\hypertarget{classduye_1_1_cfg_mgr_ab488e75b9fe73cd5b9442b9d7ad8365c}{bool {\bfseries set\-Value} (const std\-::string \&path, const int64 value)}\label{classduye_1_1_cfg_mgr_ab488e75b9fe73cd5b9442b9d7ad8365c}

\item 
\hypertarget{classduye_1_1_cfg_mgr_ab7a1f65cb71633e513d10c6454c32ecc}{bool {\bfseries set\-Value} (const std\-::string \&path, const uint32 value, const std\-::string \&att\-Name)}\label{classduye_1_1_cfg_mgr_ab7a1f65cb71633e513d10c6454c32ecc}

\item 
\hypertarget{classduye_1_1_cfg_mgr_a962d30aa31f4c4a2ba5de3791ea91656}{bool {\bfseries set\-Value} (const std\-::string \&path, const uint32 value)}\label{classduye_1_1_cfg_mgr_a962d30aa31f4c4a2ba5de3791ea91656}

\item 
\hypertarget{classduye_1_1_cfg_mgr_a7027199972464ecf6c5dd59c76829cbd}{bool {\bfseries set\-Value} (const std\-::string \&path, const uint64 value, const std\-::string \&att\-Name)}\label{classduye_1_1_cfg_mgr_a7027199972464ecf6c5dd59c76829cbd}

\item 
\hypertarget{classduye_1_1_cfg_mgr_a2f37bfb8aef41c13fc83e1609cb9f274}{bool {\bfseries set\-Value} (const std\-::string \&path, const uint64 value)}\label{classduye_1_1_cfg_mgr_a2f37bfb8aef41c13fc83e1609cb9f274}

\item 
\hypertarget{classduye_1_1_cfg_mgr_a66ca4afb13d888aaa9f1fb4c21043b14}{bool {\bfseries set\-Value} (const std\-::string \&path, const int8 $\ast$value, const std\-::string \&att\-Name)}\label{classduye_1_1_cfg_mgr_a66ca4afb13d888aaa9f1fb4c21043b14}

\item 
\hypertarget{classduye_1_1_cfg_mgr_aaee4de6f097e10bd1e93a17082e5785c}{bool {\bfseries set\-Value} (const std\-::string \&path, const int8 $\ast$value)}\label{classduye_1_1_cfg_mgr_aaee4de6f097e10bd1e93a17082e5785c}

\item 
\hypertarget{classduye_1_1_cfg_mgr_a0b3280793514df3fc2a0d27c2c54f3a8}{bool {\bfseries set\-Value} (const std\-::string \&path, const std\-::string \&value, const std\-::string \&att\-Name)}\label{classduye_1_1_cfg_mgr_a0b3280793514df3fc2a0d27c2c54f3a8}

\item 
\hypertarget{classduye_1_1_cfg_mgr_ae2e9d4bde1eeb46357768167ef41c7fd}{bool {\bfseries set\-Value} (const std\-::string \&path, const std\-::string \&value)}\label{classduye_1_1_cfg_mgr_ae2e9d4bde1eeb46357768167ef41c7fd}

\item 
bool \hyperlink{classduye_1_1_cfg_mgr_ae47dc616788976d3ef3e8dc0cce00cc9}{get\-Value} (const std\-::string \&path, bool \&value, const std\-::string \&att\-Name)
\begin{DoxyCompactList}\small\item\em get configuration value \end{DoxyCompactList}\item 
\hypertarget{classduye_1_1_cfg_mgr_acd5eefbf5938cfd0d213798bb35527ac}{bool {\bfseries get\-Value} (const std\-::string \&path, bool \&value)}\label{classduye_1_1_cfg_mgr_acd5eefbf5938cfd0d213798bb35527ac}

\item 
\hypertarget{classduye_1_1_cfg_mgr_af0bc03a832dfd9e5bd8baa2c022c8fd5}{bool {\bfseries get\-Value} (const std\-::string \&path, int16 \&value, const std\-::string \&att\-Name)}\label{classduye_1_1_cfg_mgr_af0bc03a832dfd9e5bd8baa2c022c8fd5}

\item 
\hypertarget{classduye_1_1_cfg_mgr_a0607ea727b32a056cd3f47d97fe6b5d5}{bool {\bfseries get\-Value} (const std\-::string \&path, int16 \&value)}\label{classduye_1_1_cfg_mgr_a0607ea727b32a056cd3f47d97fe6b5d5}

\item 
\hypertarget{classduye_1_1_cfg_mgr_ad044f14d742260bab746511f6f32b1d8}{bool {\bfseries get\-Value} (const std\-::string \&path, int32 \&value, const std\-::string \&att\-Name)}\label{classduye_1_1_cfg_mgr_ad044f14d742260bab746511f6f32b1d8}

\item 
\hypertarget{classduye_1_1_cfg_mgr_a23542727cf73542159a94b0f2aa16fb6}{bool {\bfseries get\-Value} (const std\-::string \&path, int32 \&value)}\label{classduye_1_1_cfg_mgr_a23542727cf73542159a94b0f2aa16fb6}

\item 
\hypertarget{classduye_1_1_cfg_mgr_a04050445640538cb4d7303f366fafc03}{bool {\bfseries get\-Value} (const std\-::string \&path, int64 \&value, const std\-::string \&att\-Name)}\label{classduye_1_1_cfg_mgr_a04050445640538cb4d7303f366fafc03}

\item 
\hypertarget{classduye_1_1_cfg_mgr_adc3ec977d864db68eea721291977ff55}{bool {\bfseries get\-Value} (const std\-::string \&path, int64 \&value)}\label{classduye_1_1_cfg_mgr_adc3ec977d864db68eea721291977ff55}

\item 
\hypertarget{classduye_1_1_cfg_mgr_a58970bbc0e6b63b414153ec8cef233a0}{bool {\bfseries get\-Value} (const std\-::string \&path, uint16 \&value, const std\-::string \&att\-Name)}\label{classduye_1_1_cfg_mgr_a58970bbc0e6b63b414153ec8cef233a0}

\item 
\hypertarget{classduye_1_1_cfg_mgr_a593c8f5b063e6549ad4ad3097a579802}{bool {\bfseries get\-Value} (const std\-::string \&path, uint16 \&value)}\label{classduye_1_1_cfg_mgr_a593c8f5b063e6549ad4ad3097a579802}

\item 
\hypertarget{classduye_1_1_cfg_mgr_a7adfe89f4d0451bb6eb066e2886403b8}{bool {\bfseries get\-Value} (const std\-::string \&path, uint32 \&value, const std\-::string \&att\-Name)}\label{classduye_1_1_cfg_mgr_a7adfe89f4d0451bb6eb066e2886403b8}

\item 
\hypertarget{classduye_1_1_cfg_mgr_abcbf9365a2548c974c78037dbe7cdb87}{bool {\bfseries get\-Value} (const std\-::string \&path, uint32 \&value)}\label{classduye_1_1_cfg_mgr_abcbf9365a2548c974c78037dbe7cdb87}

\item 
\hypertarget{classduye_1_1_cfg_mgr_af15b09910b2ba5fd5e74cc43894912d8}{bool {\bfseries get\-Value} (const std\-::string \&path, uint64 \&value, const std\-::string \&att\-Name)}\label{classduye_1_1_cfg_mgr_af15b09910b2ba5fd5e74cc43894912d8}

\item 
\hypertarget{classduye_1_1_cfg_mgr_a16294619c3bd76141b7e8c2dca99c80b}{bool {\bfseries get\-Value} (const std\-::string \&path, uint64 \&value)}\label{classduye_1_1_cfg_mgr_a16294619c3bd76141b7e8c2dca99c80b}

\item 
\hypertarget{classduye_1_1_cfg_mgr_a0a287d6ce7637093ed14c00893491091}{bool {\bfseries get\-Value} (const std\-::string \&path, std\-::string \&value, const std\-::string \&att\-Name)}\label{classduye_1_1_cfg_mgr_a0a287d6ce7637093ed14c00893491091}

\item 
\hypertarget{classduye_1_1_cfg_mgr_aa969548d49c9ba078754a8f8e1a8c47e}{bool {\bfseries get\-Value} (const std\-::string \&path, std\-::string \&value)}\label{classduye_1_1_cfg_mgr_aa969548d49c9ba078754a8f8e1a8c47e}

\item 
\hypertarget{classduye_1_1_cfg_mgr_af32d7cf6fdb21d308b58be05f034eccc}{std\-::string {\bfseries get\-Value} (const std\-::string \&path, const std\-::string \&att\-Name)}\label{classduye_1_1_cfg_mgr_af32d7cf6fdb21d308b58be05f034eccc}

\item 
\hypertarget{classduye_1_1_cfg_mgr_af53956e9d52009e7260dc187efe0eab0}{std\-::string {\bfseries get\-Value} (const int8 $\ast$path, const int8 $\ast$att\-Name)}\label{classduye_1_1_cfg_mgr_af53956e9d52009e7260dc187efe0eab0}

\item 
\hypertarget{classduye_1_1_cfg_mgr_a9536b943b98ff61393fa00c2db0dc0ee}{std\-::string {\bfseries get\-Value} (const std\-::string \&path)}\label{classduye_1_1_cfg_mgr_a9536b943b98ff61393fa00c2db0dc0ee}

\item 
\hypertarget{classduye_1_1_cfg_mgr_a1b269741471254e5dee5532f6bd9619e}{std\-::string {\bfseries get\-Value} (const int8 $\ast$path)}\label{classduye_1_1_cfg_mgr_a1b269741471254e5dee5532f6bd9619e}

\item 
\hypertarget{classduye_1_1_cfg_mgr_a979f2fc6da5908e73d38edde916ca3e0}{bool {\bfseries get\-Nodes} (const std\-::string \&path, const std\-::list$<$ std\-::string $>$ \&attr\-List, Param\-Node\-List \&node\-List)}\label{classduye_1_1_cfg_mgr_a979f2fc6da5908e73d38edde916ca3e0}

\item 
bool \hyperlink{classduye_1_1_cfg_mgr_a8c35efb5db02afc91a0ca366db2ac0f6}{save} ()
\begin{DoxyCompactList}\small\item\em save configuration \end{DoxyCompactList}\item 
void \hyperlink{classduye_1_1_cfg_mgr_a7afc0b0deba6f897392f133105f44918}{to\-String} (std\-::string \&out\-String)
\begin{DoxyCompactList}\small\item\em printf config \end{DoxyCompactList}\item 
const std\-::string \& \hyperlink{classduye_1_1_cfg_mgr_ad8676eff8ee7ad7e7934f167f134d2f3}{get\-Conf\-Path} () const 
\begin{DoxyCompactList}\small\item\em get config file path \end{DoxyCompactList}\end{DoxyCompactItemize}
\subsection*{Static Public Member Functions}
\begin{DoxyCompactItemize}
\item 
\hypertarget{classduye_1_1_cfg_mgr_a8908b20d9f27c671533d9ff00fed239e}{static \hyperlink{classduye_1_1_cfg_mgr}{Cfg\-Mgr} \& {\bfseries ins} ()}\label{classduye_1_1_cfg_mgr_a8908b20d9f27c671533d9ff00fed239e}

\end{DoxyCompactItemize}


\subsection{Detailed Description}
configuration manager class 

\subsection{Member Function Documentation}
\hypertarget{classduye_1_1_cfg_mgr_ad8676eff8ee7ad7e7934f167f134d2f3}{\index{duye\-::\-Cfg\-Mgr@{duye\-::\-Cfg\-Mgr}!get\-Conf\-Path@{get\-Conf\-Path}}
\index{get\-Conf\-Path@{get\-Conf\-Path}!duye::CfgMgr@{duye\-::\-Cfg\-Mgr}}
\subsubsection[{get\-Conf\-Path}]{\setlength{\rightskip}{0pt plus 5cm}const std\-::string\& duye\-::\-Cfg\-Mgr\-::get\-Conf\-Path (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
) const}}\label{classduye_1_1_cfg_mgr_ad8676eff8ee7ad7e7934f167f134d2f3}


get config file path 

\begin{DoxyReturn}{Returns}
path 
\end{DoxyReturn}
\hypertarget{classduye_1_1_cfg_mgr_ae47dc616788976d3ef3e8dc0cce00cc9}{\index{duye\-::\-Cfg\-Mgr@{duye\-::\-Cfg\-Mgr}!get\-Value@{get\-Value}}
\index{get\-Value@{get\-Value}!duye::CfgMgr@{duye\-::\-Cfg\-Mgr}}
\subsubsection[{get\-Value}]{\setlength{\rightskip}{0pt plus 5cm}bool duye\-::\-Cfg\-Mgr\-::get\-Value (
\begin{DoxyParamCaption}
\item[{const std\-::string \&}]{path, }
\item[{bool \&}]{value, }
\item[{const std\-::string \&}]{att\-Name}
\end{DoxyParamCaption}
)}}\label{classduye_1_1_cfg_mgr_ae47dc616788976d3ef3e8dc0cce00cc9}


get configuration value 


\begin{DoxyParams}[1]{Parameters}
\mbox{\tt in}  & {\em path} & \-: parameter path, like \-: dfscfg.\-server.\-port \\
\hline
\mbox{\tt out}  & {\em value} & \-: get value \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
true/false 
\end{DoxyReturn}
\begin{DoxyNote}{Note}
\-: ex \-: get\-Value(\char`\"{}node\-:global.\-param\-:cpu\-\_\-precent\char`\"{}, value); get\-Value(\char`\"{}node\-\_\-name\-:name\-\_\-value.\-node\-\_\-name\-:name\-\_\-value\char`\"{}, value); $<$mangjing$>$ $<$node name=\char`\"{}global\char`\"{}$>$ \begin{DoxyVerb}<param name="mangjing_root" value="/etc/mangjing/">

<param name="cpu_precent" value="30">
\end{DoxyVerb}
 $<$/node$>$ $<$node name=\char`\"{}module\char`\"{}$>$ \begin{DoxyVerb}<param name="sys_info" status="on"/>
\end{DoxyVerb}
 $<$/node$>$ $<$/mangjing$>$ 
\end{DoxyNote}
\hypertarget{classduye_1_1_cfg_mgr_a5c40c59a30b47b14c230ac8fc23e8c68}{\index{duye\-::\-Cfg\-Mgr@{duye\-::\-Cfg\-Mgr}!load@{load}}
\index{load@{load}!duye::CfgMgr@{duye\-::\-Cfg\-Mgr}}
\subsubsection[{load}]{\setlength{\rightskip}{0pt plus 5cm}bool duye\-::\-Cfg\-Mgr\-::load (
\begin{DoxyParamCaption}
\item[{const std\-::string \&}]{file\-Path}
\end{DoxyParamCaption}
)}}\label{classduye_1_1_cfg_mgr_a5c40c59a30b47b14c230ac8fc23e8c68}
load configuration 
\begin{DoxyParams}[1]{Parameters}
\mbox{\tt in}  & {\em file\-Path} & \-: configuration file full path \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
true/false 
\end{DoxyReturn}
\hypertarget{classduye_1_1_cfg_mgr_a8c35efb5db02afc91a0ca366db2ac0f6}{\index{duye\-::\-Cfg\-Mgr@{duye\-::\-Cfg\-Mgr}!save@{save}}
\index{save@{save}!duye::CfgMgr@{duye\-::\-Cfg\-Mgr}}
\subsubsection[{save}]{\setlength{\rightskip}{0pt plus 5cm}bool duye\-::\-Cfg\-Mgr\-::save (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
)}}\label{classduye_1_1_cfg_mgr_a8c35efb5db02afc91a0ca366db2ac0f6}


save configuration 

\begin{DoxyReturn}{Returns}
true/false 
\end{DoxyReturn}
\hypertarget{classduye_1_1_cfg_mgr_a44189e43c4b5da93417d1d1158d6fc62}{\index{duye\-::\-Cfg\-Mgr@{duye\-::\-Cfg\-Mgr}!set\-Value@{set\-Value}}
\index{set\-Value@{set\-Value}!duye::CfgMgr@{duye\-::\-Cfg\-Mgr}}
\subsubsection[{set\-Value}]{\setlength{\rightskip}{0pt plus 5cm}bool duye\-::\-Cfg\-Mgr\-::set\-Value (
\begin{DoxyParamCaption}
\item[{const std\-::string \&}]{path, }
\item[{const bool}]{value, }
\item[{const std\-::string \&}]{att\-Name}
\end{DoxyParamCaption}
)}}\label{classduye_1_1_cfg_mgr_a44189e43c4b5da93417d1d1158d6fc62}


get configuration value 


\begin{DoxyParams}[1]{Parameters}
\mbox{\tt in}  & {\em path} & \-: parameter path, like \-: dfscfg.\-server.\-port \\
\hline
\mbox{\tt out}  & {\em value} & \-: get value \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
true/false 
\end{DoxyReturn}
\begin{DoxyNote}{Note}
\-: ex \-: set\-Value(\char`\"{}node\-:global.\-param\-:cpu\-\_\-precent\char`\"{}, value); $<$mangjing$>$ $<$node name=\char`\"{}global\char`\"{}$>$ \begin{DoxyVerb}<param name="mangjing_root" value="/etc/mangjing/">

<param name="cpu_precent" value="30">
\end{DoxyVerb}
 $<$/node$>$ $<$node name=\char`\"{}module\char`\"{}$>$ \begin{DoxyVerb}<param name="sys_info" status="on"/>
\end{DoxyVerb}
 $<$/node$>$ $<$/mangjing$>$ 
\end{DoxyNote}
\hypertarget{classduye_1_1_cfg_mgr_a7afc0b0deba6f897392f133105f44918}{\index{duye\-::\-Cfg\-Mgr@{duye\-::\-Cfg\-Mgr}!to\-String@{to\-String}}
\index{to\-String@{to\-String}!duye::CfgMgr@{duye\-::\-Cfg\-Mgr}}
\subsubsection[{to\-String}]{\setlength{\rightskip}{0pt plus 5cm}void duye\-::\-Cfg\-Mgr\-::to\-String (
\begin{DoxyParamCaption}
\item[{std\-::string \&}]{out\-String}
\end{DoxyParamCaption}
)}}\label{classduye_1_1_cfg_mgr_a7afc0b0deba6f897392f133105f44918}


printf config 

\begin{DoxyReturn}{Returns}

\end{DoxyReturn}


The documentation for this class was generated from the following file\-:\begin{DoxyCompactItemize}
\item 
Z\-:/duye/src/duyebase/public/\hyperlink{duye__cfg__mgr_8h}{duye\-\_\-cfg\-\_\-mgr.\-h}\end{DoxyCompactItemize}
